<?php
class BaseTemplate
{
	public function display($path, $vars, $return = false)
	{
		if($vars) extract($vars);
		
		$suffix = ConfigerFactory::create()->get('config.web:templateSuffix');
		if(!$suffix) $suffix = '.tpl.php';
		
		if(!$return)
		{
			include $path . $suffix;
		}
		else
		{
			ob_start();
			include $path . $suffix;
			$contents = ob_get_contents();
			ob_end_clean();
			
			return $contents;
		}
	}
}
?>